/**   
 * Copyright © 2018 HIT akeil. Tech Ltd. All rights reserved.
 * 
 * 功能描述：
 * @Package: com.akeil.statusline 
 * @author: snow   
 * @date: 2018年7月29日 上午10:20:53 
 */
package com.akeil.flash.statusline;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.jface.action.StatusLineContributionItem;

public class ContributionPool {
	private final Map<String,StatusLineContributionItem> cmap = new HashMap<String,StatusLineContributionItem>();
	private static final ContributionPool cpool = new ContributionPool();
	
	private ContributionPool(){
		
	}
	
	public static ContributionPool getInstance(){
		return cpool;
	}
	
	public void setContrbution(String key,StatusLineContributionItem item){
		if(!cmap.containsKey(key)){
			cmap.put(key, item);
		}
	}
	
	public StatusLineContributionItem getContrbution(String key){
		if(cmap.containsKey(key)){
			return cmap.get(key);
		}
		return null;
	}
}
